package com.yfp.operation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.operation.domain.ActivitySignInsClients;
import com.yfp.operation.domain.dto.ActivitySignInsClientsCountDTO;
import com.yfp.operation.domain.dto.ActivitySignInsSearchParticipationReq2DTO;
import com.yfp.operation.domain.vo.ActivitySignInsSearchParticipationReqVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * @description 针对表【activity_sign_ins_clients(打卡管理-参与用户表)】的数据库操作Mapper
 * @createDate 2025-01-02 10:22:14
 * @Entity domain.com.yfp.operation.ActivitySignInsClients
 */
public interface ActivitySignInsClientsMapper extends BaseMapper<ActivitySignInsClients> {

    /**
     * 根据活动id统计打卡次数
     *
     * @param activitySignInsIds
     * @return
     */
    List<ActivitySignInsClientsCountDTO> countByActivitySignInsIds(List<Long> activitySignInsIds);

    /**
     * 根据活动id查询参与用户列表
     *
     * @param searchReqDTO
     * @return
     */
    List<ActivitySignInsSearchParticipationReqVO> searchParticipationList(ActivitySignInsSearchParticipationReq2DTO searchReqDTO);

    /**
     * 根据条件查询
     *
     * @param activitySignInsClients
     * @return
     */
    List<ActivitySignInsClients> selectByReq(ActivitySignInsClients activitySignInsClients);

    /**
     * 增加打卡次数
     *
     * @param clientId
     * @param activitySignInsId
     */
    void incrementCount(@Param("clientId") String clientId, @Param("activitySignInsId") Long activitySignInsId);

    /**
     * 查询当前用户当前活动打卡次数
     *
     * @param clientId
     * @param activitySignInsId
     * @return
     */
    Long selectCurrentCount(@Param("clientId") String clientId, @Param("activitySignInsId") Long activitySignInsId);
}




